package leetcode.editor.week.week304;

public class Solution6133 {
    // https://leetcode.cn/problems/maximum-number-of-groups-entering-a-competition/
    public int maximumGroups(int[] grades) {
        int i = grades.length, count = 1, res = 0;
        while (i >= count) {
            i -= count;
            res++;
            count++;
        }

        return res;
    }
}
